import request from '@/utils/request'

// 查询用户条款列表
export function listTerms(query) {
  return request({
    url: '/manage/terms/list',
    method: 'get',
    params: query
  })
}

// 查询用户条款详细
export function getTerms(id) {
  return request({
    url: '/manage/terms/' + id,
    method: 'get'
  })
}

// 新增用户条款
export function addTerms(data) {
  return request({
    url: '/manage/terms',
    method: 'post',
    data: data
  })
}

// 修改用户条款
export function updateTerms(data) {
  return request({
    url: '/manage/terms',
    method: 'put',
    data: data
  })
}

// 删除用户条款
export function delTerms(id) {
  return request({
    url: '/manage/terms/' + id,
    method: 'delete'
  })
}

// 导出用户条款
export function exportTerms(query) {
  return request({
    url: '/manage/terms/export',
    method: 'get',
    params: query
  })
}